﻿using com.iot.core.annotation;
using com.iot.core.data;
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations; 

namespace com.iot.ht.Controllers.htsql.data
{
    [Schema(Name = "SQl内容", Description = "")]     
    public class HtSqlItem : BaseEntity
    {
        [Comment("分组编号")]
        [Schema(Name = "分组编号", Description = "")]
        [Required(ErrorMessage = "{0}不能为空")]
        public long HtsqlgroupId { get; set; }


        [Comment("名称")]
        [Schema(Name = "名称", Description = "")]
        [Required(ErrorMessage = "{0}不能为空")]
        [MaxLength(50)]
        public string Name { get; set; } = "";

 
        [Comment("类型")]
        [Schema(Name = "类型", Description = "查询 操作")]
        [Required(ErrorMessage = "{0}不能为空")]
        [MaxLength(50)]
        public string Lx { get; set; } = "";//

        [Comment("参数1名称1")]
        [Schema(Name = "参数1名称", Description = "")] 
        [MaxLength(50)]
        public string P1Name { get; set; } = "";

        [Comment("参数2名称")]
        [Schema(Name = "参数2名称", Description = "")]
        [MaxLength(50)]
        public string P2Name { get; set; } = "";

        [Comment("参数3名称")]
        [Schema(Name = "参数3名称", Description = "")]
        [MaxLength(50)]
        public string P3Name { get; set; } = "";

        [Comment("参数4名称")]
        [Schema(Name = "参数4名称", Description = "")]
        [MaxLength(50)]
        public string P4Name { get; set; } = "";



        [Comment("备份Sql")]
        [Schema(Name = "备份Sql", Description = "")] 
        [MaxLength(2000)]
        public string BkSql { get; set; } = "";



        [Comment("执行Sql")]
        [Schema(Name = "执行Sql", Description = "")]
        [Required(ErrorMessage = "{0}不能为空")]
        [MaxLength(2000)]
        public string RunSql { get; set; } = "";


        [Comment("排序号")]
        [Schema(Name = "排序号", Description = "")]
        public long Sortno { get; set; } = 3;



        [Comment("创建日期")]
        [Schema(Name = "创建日期", Description = "")]
        public DateTime CrtDt { get; set; }


        [Comment("创建人编号")]
        [Schema(Name = "创建人编号", Description = "")]
        public long CrtUid { get; set; }


        [Comment("机构编号")]
        [Schema(Name = "机构编号", Description = "")]
        public long CrtDid { get; set; }


        [Comment("修改日期")]
        [Schema(Name = "修改日期", Description = "")]
        public DateTime EdtDt { get; set; }


        [Comment("修改人编号")]
        [Schema(Name = "修改人编号", Description = "")]
        public long EdtUid { get; set; }


        [Comment("Gid")]
        [Schema(Name = "Gid", Description = "")]
        public Guid Gid { get; set; }


        [Comment("删除标志")]
        [Schema(Name = "删除标志", Description = "")]
        public bool Deleted { get; set; }

    }
}
